package com.sigmatrix.h5.web.mode;

import java.math.BigDecimal;
import java.util.Date;

import com.sigmatrix.sc.jdbc.common.lang.Page;

import io.swagger.annotations.ApiModelProperty;

public class RebateList extends AccumulatedRebate{

	private static final long serialVersionUID = 7348647257102465576L;
	
	@ApiModelProperty("剩余总金额")
	private BigDecimal totalRebateAmount;
	
	@ApiModelProperty("明细")
	private Page<Detail> rebateDetail;
	
	
	public static class Detail{
		
		@ApiModelProperty("时间")
		private Date createTime;
		
		@ApiModelProperty("来源")
		private String source;
		
		@ApiModelProperty("金额，提现为负数，返利为整数")
		private BigDecimal amount;

		public String getSource() {
			return source;
		}

		public void setSource(String source) {
			this.source = source;
		}

		public BigDecimal getAmount() {
			return amount;
		}

		public void setAmount(BigDecimal amount) {
			this.amount = amount;
		}

		public Date getCreateTime() {
			return createTime;
		}

		public void setCreateTime(Date createTime) {
			this.createTime = createTime;
		}
	}


	public BigDecimal getTotalRebateAmount() {
		return super.getAccumulatedRebate().add(super.getAccumulatedWithDrawals());
	}


	public void setTotalRebateAmount(BigDecimal totalRebateAmount) {
		this.totalRebateAmount = totalRebateAmount;
	}


	public Page<Detail> getRebateDetail() {
		return rebateDetail;
	}


	public void setRebateDetail(Page<Detail> rebateDetail) {
		this.rebateDetail = rebateDetail;
	}
	
}
